package com.qdu.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *处理输入的关键词的servlet
 * @author Lenovo
 */
@WebServlet("/keyword")
public class keywordServlet extends HttpServlet{

            
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        PrintWriter out=resp.getWriter();
        int wrong=0;
        //获取请求参数(输入框里输入的)
        String keyword=req.getParameter("keyword");
        //执行业务逻辑
        //生成动态响应
        if(keyword.equals("正式用户"))
        {
            resp.sendRedirect("saus");
            //如果是用户，那就跳转到对应地servlet，查询所有用户信息，然后在页面显示表格
        }else if(keyword.equals("活动"))
        {
            resp.sendRedirect("ManagerActiv");
        }else if(keyword.equals("日志"))
        {
            resp.sendRedirect("searchalllogs");
        }else if(keyword.equals("用户审核"))
        {
            resp.sendRedirect("snpus");
        }
        else{
            //处理关键词错误
        }
    }
}
